package com.crane.oss.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.crane.common.core.dto.Response;
import com.crane.common.core.dto.SingleResponse;
import com.crane.oss.school.bean.request.area.UpdateSchoolTimeReq;
import com.crane.oss.sys.bean.request.party.*;
import com.crane.oss.sys.bean.resp.PartyBean;
import com.crane.oss.sys.bean.resp.TreePartyBean;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * 机构信息
 *
 * @author bealon
 * @email ccsu123456@qq.com
 * @date 2018年12月28日 19时42分58秒
 */
public interface PartyService {

    PartyBean queryParty(Long partyId);

    IPage<PartyBean> queryList(QueryPartyRequest request);


    /**
     * 查询菜单树
     *
     * @param request
     * @return
     */
    TreePartyBean queryPartyTree(QueryPartyTreeRequest request, Long opPartyId);

    /**
     * 新增机构并创建管理员用户
     * @param request
     * @return
     */
    PartyBean save(AddPartyRequest request);

    void update(UpdatePartyRequest request);

    void delete(Long partyId,Long opPartyId);

    /**
     * 查询用户所属机构
     *
     * @param id
     * @return
     * @
     */
    List<PartyBean> queryPartyByUserId(Long id);

    /**
     * 根据机构编码查询机构信息
     *
     * @param code
     * @return
     * @
     */
    PartyBean queryPartyByCode(String code);

    /**
     * 新增学校
     * @param request
     * @return
     */
    SingleResponse<PartyBean> saveSchool(AddSchoolPartyRequest request);
    /**
     * 修改学习
     * @param request
     * @return
     */
    Response updateSchool(UpdateSchoolPartyRequest request);

    /**
     * 修改毕业和开学时间
     * @param request
     * @return
     */
    Response updateSchoolTime(UpdateSchoolTimeReq request);


    /**
     * 修改学校状态
     * @return
     */
    Response updateSchoolState(Long id,Integer state);

}
